<form name="form_edit" id="form_edit" method="post" action="">
    <input type="hidden" name="tabledir" value="{:input('tabledir')}">
    <input type="hidden" name="tableid" value="{:input('id')}">
	<input type="hidden" name="lang" id="lang" value="{$lang}">
	<input type="hidden" name="addtime" value="{:time()}">
	<input type="hidden" name="attvalue">
	<div class="row">
		<div class="col-12 text-danger">
			<div class="alert alert-danger p-1 text-center d-none" id="error_tips"></div>
		</div>
		<div class="col-md-6 mb-2">
			{if config('template.feedback.realname') eq 1}
				<div class="text-danger">{:lang('v_callname')} *</div>
			{else /}
				<div>{:lang('v_callname')}</div>
			{/if}
			<input name="realname" id="realname" type="text" value="" maxlength="20" class="form-control form-control-sm">
		</div>
		<div class="col-md-6 mb-2">
		    {if config('template.feedback.mobile') eq 1}
				<div class="text-danger">{:lang('v_mobile')} *</div>
			{else /}
				<div>{:lang('v_mobile')}</div>
			{/if}
			<input name="mobile" id="mobile" type="text" value="" maxlength="20" class="form-control form-control-sm">
		</div>
		<div class="col-md-6 mb-2">
		    {if config('template.feedback.telephone') eq 1}
				<div class="text-danger">{:lang('v_telephone')} *</div>
			{else /}
				<div>{:lang('v_telephone')}</div>
			{/if}
			<input name="telephone" id="telephone" type="text" value="" maxlength="20" class="form-control form-control-sm">
		</div>
		<div class="col-md-6 mb-2">
			{if config('template.feedback.email') eq 1}
				<div class="text-danger">{:lang('v_email')} *</div>
			{else /}
				<div>{:lang('v_email')}</div>
			{/if}
			<input name="email" id="email" type="text" value="" maxlength="30" class="form-control form-control-sm">
		</div>
	    {if !empty($gb_attribute) and request()->controller() eq 'About'}
	        {volist name="gb_attribute" id="attRs"}
	            {php}$attvalueArr = explode(PHP_EOL,$attRs['attvalue']);{/php}
                <div class="col-md-12">
			        <label class="mb-0 {if stripos($attRs.title,'*')>0}text-danger{/if}">{$attRs.title}</label>
			        {switch attRs.fieldtype}
			            {case text}<input name="attvalue{$key}" id="attvalue{$key}" type="text" value="" placeholder="{$attRs.attvalue}" class="form-control form-control-sm mb-2">{/case}
			            {case radio}：
			                {foreach $attvalueArr as $radioValue} 
			                    <label class="checkbox-inline ml-4"><input name="attvalue{$key}" id="attvalue{$key}" type="radio" value="{:str_replace('*','',$radioValue)}" {if stripos($radioValue,'*')>0}checked="checked"{/if}> {:str_replace('*','',$radioValue)}</label>
			                {/foreach}
			            {/case}
			            {case checkbox}：
			                {foreach $attvalueArr as $checkboxValue} 
			                    <label class="checkbox-inline ml-4"><input name="attvalue{$key}[]" type="checkbox" value="{:str_replace('*','',$checkboxValue)}" {if stripos($checkboxValue,'*')>0}checked="checked"{/if}> {:str_replace('*','',$checkboxValue)}</label>
			                {/foreach}
			            {/case}
			            {case textarea}<textarea name="attvalue{$key}" maxlength="500" rows="3" class="form-control form-control-sm mb-2" placeholder="{$attRs.attvalue}"></textarea>{/case}
			        {/switch}
		        </div>
		    {/volist}
	    {/if}
		<div class="col-md-12">
		    {if config('template.feedback.content') eq 1}
				<div class="text-danger">{:lang('v_feedback_content')} *</div>
			{else /}
				<div>{:lang('v_feedback_content')}</div>
			{/if}
			<textarea name="content" id="content" maxlength="1000" rows="5" class="form-control form-control-sm"></textarea>
		</div>
		<div class="col-md-12 mt-3">
			<div class="row">
			    <div class="col-lg-8 col-sm-7 col-12 mb-3">
			        {if $feedback_captcha eq 1}
			    		<input type="text" name="verify" id="verify" maxlength="4" class="form-control form-control-sm float-left" style="max-width: 125px;"> <img id="img_verify" src="/captcha/" onclick="this.src='/captcha/?randid='+Math.floor(Math.random()*100);" border="0" width="125" height="30" align="absmiddle" class="float-left ml-1" />
			    	{/if}
			    </div>
			    <div class="col-lg-4 col-sm-5 col-12 mb-3">
			    	<button type="button" class="do_ajax w-100 btn btn-danger btn-rounded h7" onclick="javascript:do_ajax('#form_edit','.do_ajax','{:url('/api/feedback/consult')}','');"><i class="fa fa-check-circle mr-1"></i>{:lang('v_submit')}</button>
			    </div>
		    </div>
		</div>
    </div>
</form>